00001
00024
00025 #include "inc/hw_memmap.h"
00026 #include "inc/hw_types.h"
00027 #include "driverlib/gpio.h"
00028
00029
00030 #include "utils/uartstdio.h"
00031 #define printf UARTprintf
00032
00033 void halInit();
00034 void delayMs(unsigned int ms);
00035 void halSpiInit();
00036 void spiWrite(unsigned char *bytes, unsigned char numBytes);
00037 void setZnpInterfaceToInputs(void);
00038 void delayMs(unsigned int ms);
00039 void toggleLed(unsigned char whichLed);
00040 signed int setLed(unsigned char led);
00041 void clearLeds();
00042
00043
00044
00045
00046
00047
00048
00049 #define RADIO_ON() ( GPIOPinWrite(GPIO_PORTD_BASE, GPIO_PIN_5, GPIO_PIN_5) ) //(P1OUT |= BIT2)
00050 #define RADIO_OFF() ( GPIOPinWrite(GPIO_PORTD_BASE, GPIO_PIN_5, 0) ) //(P1OUT &= ~BIT2)
00051 #define SPI_SS_SET() ( GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_4, 0) ) //(P5OUT &= ~BIT0) //MRDY tied to CS in hardware
00052 #define SPI_SS_CLEAR() ( GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_4, GPIO_PIN_4) ) //(P5OUT |= BIT0)
00053 #define SRDY_IS_HIGH() (GPIOPinRead(GPIO_PORTD_BASE, GPIO_PIN_6) & GPIO_PIN_6) //(P1IN & BIT3)
00054 #define SRDY_IS_LOW() (~(GPIOPinRead(GPIO_PORTD_BASE, GPIO_PIN_6)) & GPIO_PIN_6) //((~P1IN) & BIT3)
00055